﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SnakeGame
{
    class GameField
    {
        public int Height { get; private set; }
        public int Width { get; private set; }
        public int X { get; private set; }
        public int Y { get; private set; }

        public GameField(int height, int width, int startX, int startY)
        {
            Height = height;
            Width = width;
            X = startX;
            Y = startY;
        }

        public bool IsOnField(int x, int y)
        {
            if ((x >= X) && (x < Width + X) &&
                (y >= Y) && (y < Height + Y))
                return true;
            return false;
        }
    }
}
